package com.west_traveler.viewpager_adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;

import com.west_traveler.entity.entity_editor.Imagess;
import com.west_traveler.find_page_fragment.findpageheaddragment.FindPageHeadPicFragment;

import java.util.List;

/**
 * Description:
 * created at 2016/12/5 15:28
 *
 * @author: 黄昌友
 */

public class FindPageHeadPicViewPagerAdapter extends FragmentStatePagerAdapter {

    private List<Imagess> imagesses;

    public FindPageHeadPicViewPagerAdapter(FragmentManager fm, List<Imagess> imagesses) {
        super(fm);
        this.imagesses = imagesses;
    }

    @Override
    public Fragment getItem(int position) {
        return FindPageHeadPicFragment.getInstance(imagesses.get(position));
    }

    @Override
    public int getCount() {
        return imagesses.size();
    }
}
